package sights.scenic_spot.service;

import sights.scenic_spot.dao.Sc_sp_dao;
import sights.scenic_spot.dao.Sc_sp_daoImpl;
import sights.scenic_spot.model.Scenic_spot;
import util.PageModel;

import java.util.List;

public class SpotServiceImpl implements SpotService{
    Sc_sp_dao scSpDao=new Sc_sp_daoImpl();
    @Override
    public List<Scenic_spot> selectByPage(PageModel pageModel) {
        return scSpDao.selectByPage(pageModel);
    }

    @Override
    public Scenic_spot selectById(Integer sight_id) {
        return scSpDao.selectById(sight_id);
    }

    @Override
    public List<Scenic_spot> selectByHot(PageModel pageModel, Integer is_hot) {
        return scSpDao.selectByHot(pageModel,is_hot);
    }

    @Override
    public long findBySightName(String sight_name) {
        return scSpDao.findBySightName(sight_name);
    }

    @Override
    public int saveOne(Scenic_spot scenic_spot) {
        return scSpDao.saveOne(scenic_spot);
    }

    @Override
    public int updateOne(Scenic_spot scenic_spot) {
        return scSpDao.updateOne(scenic_spot);
    }

    @Override
    public int deleteOne(Scenic_spot scenic_spot) {
        return scSpDao.deleteOne(scenic_spot);
    }
}
